<html>
<head>
<meta charset="UTF-8">
<title>HTML5+CSS3城市场景动画</title>
<style>
body {margin:0; padding:0; background-color:#ddf5f7;}
/*-------- 天空背景以及动画 --------*/
.stage {
	position: relative;
	overflow: hidden;
	height: 600px;
	background: #ddf5f7;
	animation: stage 30s linear infinite normal;
	-webkit-animation: stage 30s linear infinite normal;
}
@keyframes stage {
	0% { background: #ddf5f7;}
	25% { background: #350847;}
	50% { background: #0f192c;}
	75% { background: #f9c7b8;}
	100% { background: #ddf5f7;}
}
@-webkit-keyframes stage {
	0% { background: #ddf5f7;}
	25% { background: #350847;}
	50% { background: #0f192c;}
	75% { background: #f9c7b8;}
	100% { background: #ddf5f7;}
}

/*-------- 气球以及动画 --------*/
.balloon {
	position: absolute;
	z-index: 14;
	top: 5%;
	right: -5%;
	background: url(images/balloon.png) no-repeat no-repeat center;
	height: 227px;
	width: 157px;
	-webkit-animation: ball 55s linear infinite alternate;
	-o-animation: ball 55s  linear infinite alternate;
	animation: ball 55s linear infinite alternate ;
}
@keyframes ball {
	0%{
		right: -5%;
		transform:rotate(15deg)}
	25%{
		right: 25%;
		transform:rotate(-20deg)}
	50%{
		right: 50%;
		transform:rotate(25deg)}
	75%{
		right: 75%;
		transform:rotate(-25deg)}
	100%{
		right: 100%;
		transform:rotate(35deg)}
}
/*-------- 城市场景图片 --------*/
.skyline {
	position: absolute;
	z-index: 5;
	width: 100%;
	bottom: 26%;
	background: url(images/skyline.png) repeat no-repeat;
	height: 147px;
}
.beans {
	position: absolute;
	z-index: 4;
	height: 201px;
	width: 88px;
	bottom: 30%;
	left: 50%;
	background: url(images/beans.png) no-repeat no-repeat;
}
.ground {
	position: absolute;
	width: 100%;
	bottom: 0;
}
.cloudLarge{
	position: absolute;
	z-index: 8;
	background: url(images/cloudLarge.png) repeat no-repeat center;
	width: 302px;
	height: 169px;
	top: 3%;
	right: 8%;
	-webkit-animation: lar 105s linear infinite alternate;
	-o-animation: lar 105s linear infinite alternate;
	animation: lar 105s linear infinite alternate;}
@keyframes lar {
	from{
		right: -5%;}
	to{
		right: 115%;}
}
.cloudMedium{
	position: absolute;
	z-index: 12;
	background: url(images/cloudMedium.png) repeat no-repeat center;
	width: 159px;
	height: 92px;
	top: 15%;
	left: 15%;
	-webkit-animation: med 145s linear infinite alternate;
	-o-animation: med 145s linear infinite alternate;
	animation: med 145s linear infinite alternate;}
@keyframes med {
	from{
		left: -5%;}
	to{
		left: 125%;}
}
.cloudSmall{
	position: absolute;
	z-index: 18;
	background: url(images/cloudSmall.png) repeat no-repeat center;
	width: 89px;
	height: 50px;
	top: 3%;
	left: 8%;
	-webkit-animation: sma 75s linear infinite alternate;
	-o-animation: sma 75s linear infinite alternate;
	animation: sma 75s linear infinite alternate;}
@keyframes sma {
	from{
		left: 0%;}
	to{
		left: 115%;}
}
.ground.front {
	z-index: 30;
	background: url(images/groundFront.png) repeat no-repeat center;
	height: 301px;
}
.ground.mid {
	z-index: 20;
	background: url(images/groundMid.png) repeat no-repeat;
	height: 299px;
}
.ground.back {
	z-index: 10;
	background: url(images/groundBack.png) repeat no-repeat center;
	height: 281px;
}
.dowEventCenter {
	position: absolute;
	z-index: 12;
	bottom: 20%;
	left: 5%;
	background: url(images/dowEventCenter.png) no-repeat no-repeat center;
	height: 236px;
	width: 524px;
}
.planetarium {
	position: absolute;
	z-index: 12;
	bottom: 18%;
	right: 10%;
	background: url(images/Planetarium.png) no-repeat no-repeat center;
	height: 285px;
	width: 347px;
}
.friendshipShell {
	position: absolute;
	z-index: 21;
	bottom: 18%;
	left: 20%;
	background: url(images/friendshipShell.png) no-repeat no-repeat center;
	height: 370px;
	width: 231px;
}
.glockenspiel {
	position: absolute;
	z-index: 11;
	bottom: 26%;
	right: 50%;
	background: url(images/Glockenspiel.png) no-repeat no-repeat center;
	height: 263px;
	width: 137px;
}

</style>
</head>
<body>

<section>
  <div class="stage">
    <div class="skyline"></div>
	  <div class="cloudLarge"></div>
	  <div class="cloudMedium"></div>
	  <div class="cloudSmall"></div>
    <div class="beans"></div>
    <div class="ground back"></div>
    <div class="ground mid"></div>
    <div class="ground front"></div>
    <div class="dowEventCenter"></div>
    <div class="planetarium"></div>
    <div class="friendshipShell"></div>
    <div class="glockenspiel"></div>
    <!--汽球-->
    <div class="balloon"></div>
  </div>
</section>
</body>
</html>